class TestThread extends Thread {
    public void run() {
        while (true) {
            System.out.println("Hello: " + Thread.currentThread().getId());
            System.out.println("Hello: " + Thread.currentThread().getName());
            System.out.println("Hello: " + Thread.currentThread().getState());
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}

public class Demo1 {

    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new TestThread();
        t1.start();

        while (true) {
            System.out.println("Hello: " + Thread.currentThread().getId());
            System.out.println("Hello: " + Thread.currentThread().getName());
            System.out.println("Hello: " + Thread.currentThread().getState());

            Thread.sleep(3000);

        }
    }
}
